package com.binarysoft.service.product;

import java.util.Collection;

import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

public interface ProductDAO extends ProductMapper {
	 @Select({
	        "select",
	        "id, name, type, description, creation_time",
	        "from product"
	    })
	    @Results({
	        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
	        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
	        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
	        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
	        @Result(column="creation_time", property="creationTime", jdbcType=JdbcType.DATE)
	    })
	    Collection<Product> selectAll();
}
